var Ih = function() {
    function t() {
        this.n = null,
            this.e = 0,
            this.d = null,
            this.p = null,
            this.q = null,
            this.dmp1 = null,
            this.dmq1 = null,
            this.coeff = null
    }
    return t.prototype.doPublic = function(e) {
        return e.modPowInt(this.e, this.n)
    }
        ,
        t.prototype.doPrivate = function(e) {
            if (this.p == null || this.q == null)
                return e.modPow(this.d, this.n);
            for (var n = e.mod(this.p).modPow(this.dmp1, this.p), r = e.mod(this.q).modPow(this.dmq1, this.q); n.compareTo(r) < 0; )
                n = n.add(this.p);
            return n.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)
        }
        ,
        t.prototype.setPublic = function(e, n) {
            e != null && n != null && e.length > 0 && n.length > 0 ? (this.n = vt(e, 16),
                this.e = parseInt(n, 16)) : console.error("Invalid RSA public key")
        }
        ,
        t.prototype.encrypt = function(e) {
            var n = this.n.bitLength() + 7 >> 3
                , r = Bh(e, n);
            if (r == null)
                return null;
            var s = this.doPublic(r);
            if (s == null)
                return null;
            for (var i = s.toString(16), o = i.length, l = 0; l < n * 2 - o; l++)
                i = "0" + i;
            return i
        }
        ,
        t.prototype.setPrivate = function(e, n, r) {
            e != null && n != null && e.length > 0 && n.length > 0 ? (this.n = vt(e, 16),
                this.e = parseInt(n, 16),
                this.d = vt(r, 16)) : console.error("Invalid RSA private key")
        }
        ,
        t.prototype.setPrivateEx = function(e, n, r, s, i, o, l, a) {
            e != null && n != null && e.length > 0 && n.length > 0 ? (this.n = vt(e, 16),
                this.e = parseInt(n, 16),
                this.d = vt(r, 16),
                this.p = vt(s, 16),
                this.q = vt(i, 16),
                this.dmp1 = vt(o, 16),
                this.dmq1 = vt(l, 16),
                this.coeff = vt(a, 16)) : console.error("Invalid RSA private key")
        }
        ,
        t.prototype.generate = function(e, n) {
            var r = new Rs
                , s = e >> 1;
            this.e = parseInt(n, 16);
            for (var i = new X(n,16); ; ) {
                for (; this.p = new X(e - s,1,r),
                           !(this.p.subtract(X.ONE).gcd(i).compareTo(X.ONE) == 0 && this.p.isProbablePrime(10)); )
                    ;
                for (; this.q = new X(s,1,r),
                           !(this.q.subtract(X.ONE).gcd(i).compareTo(X.ONE) == 0 && this.q.isProbablePrime(10)); )
                    ;
                if (this.p.compareTo(this.q) <= 0) {
                    var o = this.p;
                    this.p = this.q,
                        this.q = o
                }
                var l = this.p.subtract(X.ONE)
                    , a = this.q.subtract(X.ONE)
                    , u = l.multiply(a);
                if (u.gcd(i).compareTo(X.ONE) == 0) {
                    this.n = this.p.multiply(this.q),
                        this.d = i.modInverse(u),
                        this.dmp1 = this.d.mod(l),
                        this.dmq1 = this.d.mod(a),
                        this.coeff = this.q.modInverse(this.p);
                    break
                }
            }
        }
        ,
        t.prototype.decrypt = function(e) {
            var n = vt(e, 16)
                , r = this.doPrivate(n);
            return r == null ? null : Nh(r, this.n.bitLength() + 7 >> 3)
        }
        ,
        t.prototype.generateAsync = function(e, n, r) {
            var s = new Rs
                , i = e >> 1;
            this.e = parseInt(n, 16);
            var o = new X(n,16)
                , l = this
                , a = function() {
                var u = function() {
                    if (l.p.compareTo(l.q) <= 0) {
                        var h = l.p;
                        l.p = l.q,
                            l.q = h
                    }
                    var g = l.p.subtract(X.ONE)
                        , v = l.q.subtract(X.ONE)
                        , b = g.multiply(v);
                    b.gcd(o).compareTo(X.ONE) == 0 ? (l.n = l.p.multiply(l.q),
                        l.d = o.modInverse(b),
                        l.dmp1 = l.d.mod(g),
                        l.dmq1 = l.d.mod(v),
                        l.coeff = l.q.modInverse(l.p),
                        setTimeout(function() {
                            r()
                        }, 0)) : setTimeout(a, 0)
                }
                    , c = function() {
                    l.q = Y(),
                        l.q.fromNumberAsync(i, 1, s, function() {
                            l.q.subtract(X.ONE).gcda(o, function(h) {
                                h.compareTo(X.ONE) == 0 && l.q.isProbablePrime(10) ? setTimeout(u, 0) : setTimeout(c, 0)
                            })
                        })
                }
                    , f = function() {
                    l.p = Y(),
                        l.p.fromNumberAsync(e - i, 1, s, function() {
                            l.p.subtract(X.ONE).gcda(o, function(h) {
                                h.compareTo(X.ONE) == 0 && l.p.isProbablePrime(10) ? setTimeout(c, 0) : setTimeout(f, 0)
                            })
                        })
                };
                setTimeout(f, 0)
            };
            setTimeout(a, 0)
        }
        ,
        t.prototype.sign = function(e, n, r) {
            var s = Mh(r)
                , i = s + n(e).toString()
                , o = Dh(i, this.n.bitLength() / 4);
            if (o == null)
                return null;
            var l = this.doPrivate(o);
            if (l == null)
                return null;
            var a = l.toString(16);
            return a.length & 1 ? "0" + a : a
        }
        ,
        t.prototype.verify = function(e, n, r) {
            var s = vt(n, 16)
                , i = this.doPublic(s);
            if (i == null)
                return null;
            var o = i.toString(16).replace(/^1f+00/, "")
                , l = $h(o);
            return l == r(e).toString()
        }
        ,
        t
}();

var Fh = function() {
    var t = function(e, n) {
        return t = Object.setPrototypeOf || {
                __proto__: []
            }instanceof Array && function(r, s) {
                r.__proto__ = s
            }
            || function(r, s) {
                for (var i in s)
                    Object.prototype.hasOwnProperty.call(s, i) && (r[i] = s[i])
            }
            ,
            t(e, n)
    };
    return function(e, n) {
        if (typeof n != "function" && n !== null)
            throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
        t(e, n);
        function r() {
            this.constructor = e
        }
        e.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype,
            new r)
    }
}(), Ro = function(t) {
    Fh(e, t);
    function e(n) {
        var r = t.call(this) || this;
        return n && (typeof n == "string" ? r.parseKey(n) : (e.hasPrivateKeyProperty(n) || e.hasPublicKeyProperty(n)) && r.parsePropertiesFrom(n)),
            r
    }
    return e.prototype.parseKey = function(n) {
        try {
            var r = 0
                , s = 0
                , i = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/
                , o = i.test(n) ? xh.decode(n) : Ts.unarmor(n)
                , l = Sh.decode(o);
            if (l.sub.length === 3 && (l = l.sub[2].sub[0]),
            l.sub.length === 9) {
                r = l.sub[1].getHexStringValue(),
                    this.n = vt(r, 16),
                    s = l.sub[2].getHexStringValue(),
                    this.e = parseInt(s, 16);
                var a = l.sub[3].getHexStringValue();
                this.d = vt(a, 16);
                var u = l.sub[4].getHexStringValue();
                this.p = vt(u, 16);
                var c = l.sub[5].getHexStringValue();
                this.q = vt(c, 16);
                var f = l.sub[6].getHexStringValue();
                this.dmp1 = vt(f, 16);
                var h = l.sub[7].getHexStringValue();
                this.dmq1 = vt(h, 16);
                var g = l.sub[8].getHexStringValue();
                this.coeff = vt(g, 16)
            } else if (l.sub.length === 2)
                if (l.sub[0].sub) {
                    var v = l.sub[1]
                        , b = v.sub[0];
                    r = b.sub[0].getHexStringValue(),
                        this.n = vt(r, 16),
                        s = b.sub[1].getHexStringValue(),
                        this.e = parseInt(s, 16)
                } else
                    r = l.sub[0].getHexStringValue(),
                        this.n = vt(r, 16),
                        s = l.sub[1].getHexStringValue(),
                        this.e = parseInt(s, 16);
            else
                return !1;
            return !0
        } catch (w) {
            return !1
        }
    }
        ,
        e.prototype.getPrivateBaseKey = function() {
            var n = {
                array: [new C.asn1.DERInteger({
                    int: 0
                }), new C.asn1.DERInteger({
                    bigint: this.n
                }), new C.asn1.DERInteger({
                    int: this.e
                }), new C.asn1.DERInteger({
                    bigint: this.d
                }), new C.asn1.DERInteger({
                    bigint: this.p
                }), new C.asn1.DERInteger({
                    bigint: this.q
                }), new C.asn1.DERInteger({
                    bigint: this.dmp1
                }), new C.asn1.DERInteger({
                    bigint: this.dmq1
                }), new C.asn1.DERInteger({
                    bigint: this.coeff
                })]
            }
                , r = new C.asn1.DERSequence(n);
            return r.getEncodedHex()
        }
        ,
        e.prototype.getPrivateBaseKeyB64 = function() {
            return vr(this.getPrivateBaseKey())
        }
        ,
        e.prototype.getPublicBaseKey = function() {
            var n = new C.asn1.DERSequence({
                array: [new C.asn1.DERObjectIdentifier({
                    oid: "1.2.840.113549.1.1.1"
                }), new C.asn1.DERNull]
            })
                , r = new C.asn1.DERSequence({
                array: [new C.asn1.DERInteger({
                    bigint: this.n
                }), new C.asn1.DERInteger({
                    int: this.e
                })]
            })
                , s = new C.asn1.DERBitString({
                hex: "00" + r.getEncodedHex()
            })
                , i = new C.asn1.DERSequence({
                array: [n, s]
            });
            return i.getEncodedHex()
        }
        ,
        e.prototype.getPublicBaseKeyB64 = function() {
            return vr(this.getPublicBaseKey())
        }
        ,
        e.wordwrap = function(n, r) {
            if (r = r || 64,
                !n)
                return n;
            var s = "(.{1," + r + "})( +|$\n?)|(.{1," + r + "})";
            return n.match(RegExp(s, "g")).join("\n")
        }
        ,
        e.prototype.getPrivateKey = function() {
            var n = "-----BEGIN RSA PRIVATE KEY-----\n";
            return n += e.wordwrap(this.getPrivateBaseKeyB64()) + "\n",
                n += "-----END RSA PRIVATE KEY-----",
                n
        }
        ,
        e.prototype.getPublicKey = function() {
            var n = "-----BEGIN PUBLIC KEY-----\n";
            return n += e.wordwrap(this.getPublicBaseKeyB64()) + "\n",
                n += "-----END PUBLIC KEY-----",
                n
        }
        ,
        e.hasPublicKeyProperty = function(n) {
            return n = n || {},
            n.hasOwnProperty("n") && n.hasOwnProperty("e")
        }
        ,
        e.hasPrivateKeyProperty = function(n) {
            return n = n || {},
            n.hasOwnProperty("n") && n.hasOwnProperty("e") && n.hasOwnProperty("d") && n.hasOwnProperty("p") && n.hasOwnProperty("q") && n.hasOwnProperty("dmp1") && n.hasOwnProperty("dmq1") && n.hasOwnProperty("coeff")
        }
        ,
        e.prototype.parsePropertiesFrom = function(n) {
            this.n = n.n,
                this.e = n.e,
            n.hasOwnProperty("d") && (this.d = n.d,
                this.p = n.p,
                this.q = n.q,
                this.dmp1 = n.dmp1,
                this.dmq1 = n.dmq1,
                this.coeff = n.coeff)
        }
        ,
        e
}(Ih), Vh = {}, rs, jh = typeof process < "u" ? (rs = Vh) === null || rs === void 0 ? void 0 : rs.npm_package_version : void 0, Uh = function() {
    function t(e) {
        e === void 0 && (e = {}),
            e = e || {},
            this.default_key_size = e.default_key_size ? parseInt(e.default_key_size, 10) : 1024,
            this.default_public_exponent = e.default_public_exponent || "010001",
            this.log = e.log || !1,
            this.key = null
    }
    return t.prototype.setKey = function(e) {
        this.log && this.key && console.warn("A key was already set, overriding existing."),
            this.key = new Ro(e)
    }
        ,
        t.prototype.setPrivateKey = function(e) {
            this.setKey(e)
        }
        ,
        t.prototype.setPublicKey = function(e) {
            this.setKey(e)
        }
        ,
        t.prototype.decrypt = function(e) {
            try {
                return this.getKey().decrypt(wo(e))
            } catch (n) {
                return !1
            }
        }
        ,
        t.prototype.encrypt = function(e) {
            try {
                return vr(this.getKey().encrypt(e))
            } catch (n) {
                return !1
            }
        }
        ,
        t.prototype.sign = function(e, n, r) {
            try {
                return vr(this.getKey().sign(e, n, r))
            } catch (s) {
                return !1
            }
        }
        ,
        t.prototype.verify = function(e, n, r) {
            try {
                return this.getKey().verify(e, wo(n), r)
            } catch (s) {
                return !1
            }
        }
        ,
        t.prototype.getKey = function(e) {
            if (!this.key) {
                if (this.key = new Ro,
                e && {}.toString.call(e) === "[object Function]") {
                    this.key.generateAsync(this.default_key_size, this.default_public_exponent, e);
                    return
                }
                this.key.generate(this.default_key_size, this.default_public_exponent)
            }
            return this.key
        }
        ,
        t.prototype.getPrivateKey = function() {
            return this.getKey().getPrivateKey()
        }
        ,
        t.prototype.getPrivateKeyB64 = function() {
            return this.getKey().getPrivateBaseKeyB64()
        }
        ,
        t.prototype.getPublicKey = function() {
            return this.getKey().getPublicKey()
        }
        ,
        t.prototype.getPublicKeyB64 = function() {
            return this.getKey().getPublicBaseKeyB64()
        }
        ,
        t.version = jh,
        t
}();
const Hh = "weibo"
    , qh = 4e3
    , Kh = "8b4a2bef633eb0264367b3ba9fa1dd3d"
    , zh = "https://security.weibo.com/iforgot/loginname?entry=".concat(Hh, "&loginname=")
    , Wh = "https://weibo.com/signup/signup.php"
    , Gh = "https://h5.sinaimg.cn/upload/1005/891/2024/01/04/weibologo.png"
    , Os = async t => t.then(e => [null, e]).catch(e => [e, null])
    , hn = (t, e={}) => {
    if (e.method === "POST") {
        const n = Object.assign({}, e);
        return delete n.method,
            Os(ut.post(t, n))
    } else {
        const n = Object.assign({}, e);
        return delete n.method,
            Os(ut.get(t, {
                params: n
            }))
    }
}
    , ma = t => Os(new Promise( (e, n) => {
        if (!window.gtInit) {
            n({
                params: {},
                msg: "极验未初始化"
            });
            return
        }
        window.gtInit({
                geetestKey: t,
                captchaId: Kh,
                product: "bind"
            }, (r, s, i) => {
                i ? e({
                    params: r,
                    msg: s
                }) : n({
                    params: r,
                    msg: s
                })
            }
        )
    }
))
    , Zh = t => {
    const e = atob(t)
        , n = new Uint8Array(e.length);
    for (let s = 0; s < e.length; s++)
        n[s] = e.charCodeAt(s);
    return Array.from(n).map(s => s.toString(16).padStart(2, "0")).join("")
}
    , Jh = (t, e) => {
    if (!e || !t)
        return;
    const n = new Uh({
        default_public_exponent: "10001"
    });
    console.log(n)
    n.setPublicKey(e)
    console.log(111111111111111111)
    hehe = n.encrypt(t)
    return Zh(hehe)
}


var s = {
    "curType": "show_pw",
    "show_pw": true,
    "show_qq": false,
    "show_qr": true,
    "show_sms": true,
    "show_wechat": false,
    "errMsg": "抱歉！登录失败，请稍候再试",
    "entry": "miniblog",
    "source": "miniblog",
    "isMobile": false,
    "checked": false,
    "regUrl": "https://weibo.com/signup/signup.php",
    "forgetUrl": "https://security.weibo.com/iforgot/loginname?entry=miniblog&loginname=",
    "iconUrl": "https://h5.sinaimg.cn/upload/1005/891/2024/01/04/weibologo.png",
    "pubkey": "-----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDrKjhWhmGIf6GAvdtcq9XyHHv9WcCQyy0kWoesJTBiiCcpKT5VBjUFCOf5qju3f0MzIxSQ+RX21jxV/i8IpJs1P0RK05k8rMAtt4Sru45CqbG7//s4vhjXjoeg5Bubj3OpKO4MzuH2c5iEuXd+T+noihu+SVknrEp5mzGB1kQkQwIDAQAB-----END PUBLIC KEY-----",
    "rsakv": "1330428213",
    "isSina": false
}
function generatePassword(password){
    return Jh("".concat([1733326573, "DRG7PZ"].join(" "), "\n").concat(password), "-----BEGIN PUBLIC KEY-----\n" +
        "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDrKjhWhmGIf6GAvdtcq9XyHHv9\n" +
        "WcCQyy0kWoesJTBiiCcpKT5VBjUFCOf5qju3f0MzIxSQ+RX21jxV/i8IpJs1P0RK\n" +
        "05k8rMAtt4Sru45CqbG7//s4vhjXjoeg5Bubj3OpKO4MzuH2c5iEuXd+T+noihu+\n" +
        "SVknrEp5mzGB1kQkQwIDAQAB\n" +
        "-----END PUBLIC KEY-----")
}

console.log(generatePassword("123123"))